#include <stdio.h>
#include <memory>

//void init(void) __attribute__((constructor));

void init(void) {

    printf("before enter main!\n");

}

void exit_func(void){

    printf("after leave main!\n");

}

int f() {
	printf("before");
	return 0;
}

int _ = f();


int main(void){

    int *m = (int*)malloc(sizeof(int));

    atexit(exit_func);

    printf("hello world!\n");

}
 